<?php
	require_once('../webroot/js/clsMsDocGenerator.php');	
		
	$doc = new clsMsDocGenerator();
	
	$doc->setFontFamily('Arial');
	$doc->setFontSize('10');
	
	$doc->addParagraph('CORPORACI&Oacute;N INFANCIA Y DESARROLLO',array('text-align'=>'center','font-weight' => 'bold'));
	$doc->addParagraph('NIT  830.082.544-7',array('text-align'=>'center','font-weight' => 'bold'));
	$doc->addParagraph('"Implementaci&oacute;n del Modelo Educativo A CRECER"',array('text-align'=>'center','font-weight' => 'bold'));
	$doc->addParagraph($nombre_contrato,array('text-align'=>'center','font-weight' => 'bold'));
	$doc->addParagraph('');
	$doc->addParagraph('DEBE A:',array('text-align'=>'center','font-weight' => 'bold'));
	$doc->addParagraph($facilitador['nombre_completo'],array('text-align'=>'center','font-weight' => 'normal'));
	$doc->addParagraph('RUT: '.$facilitador['documento'],array('text-align'=>'center','font-weight' => 'bold'));
	$doc->addParagraph('R&eacute;gimen Simplificado ',array('text-align'=>'center','font-weight' => 'bold'));
	
	$doc->addParagraph('');
	$texto = "La suma de $725.000.oo (SETECIENTOS VEINTICINCO MIL PESOS MCTE.), por concepto de servicios prestados como Facilitador/a ";
	$texto = $texto."del proyecto 'Implementaci&oacute;n del Modelo A CRECER' que se lleva a cabo en los departamentos de Santander ";
	$texto = $texto."y Norte de Santander, en cumplimiento del ".$nombre_contrato;	
	$doc->addParagraph($texto,array('text-align'=>'justify','font-weight' => 'normal'));
	
	$doc->addParagraph('');	
	$doc->addParagraph('Fecha:__________________',array('text-align'=>'justify','font-weight' => 'normal'));
	
	$doc->addParagraph('');
	$doc->addParagraph('GRUPO: '.$info_grupo['nombre'], array('font-size' => '10pt', 'text-align'=>'right'));
	$doc->addParagraph('MUNICIPIO: '.$info_grupo['municipio'], array('font-size' => '10pt', 'text-align'=>'right'));
	$pago_info = ($pago==1)?"PAGO: 1 X 2 __ 3 __":"PAGO: 1 __ 2 X 3 __";
	$doc->addParagraph($pago_info, array('font-size' => '10pt', 'text-align'=>'right'));
	
	$doc->addParagraph('');
	$doc->addParagraph('');
	
	$doc->addParagraph('Atentamente', array('font-size' => '10pt'));
	$doc->addParagraph('');
	$doc->addParagraph('');
	
	$doc->addParagraph('Firma:_________________________', array('font-size' => '10pt'));
	$doc->addParagraph('Nombre: '.$facilitador['nombre_completo'], array('font-size' => '10pt'));
	$doc->addParagraph('C.C.: '.$facilitador['documento'], array('font-size' => '10pt'));
	$doc->addParagraph('Direccion: '.$facilitador['direccion'], array('font-size' => '10pt'));
	$doc->addParagraph('Telefono: '.$facilitador['telefono'], array('font-size' => '10pt'));
	
	$doc->addParagraph('');
	
	$doc->addParagraph('SOLICITO CONSIGNAR EL VALOR ADEUDADO EN LA SIGUIENTE CUENTA:', array('font-weight' => 'bold','font-size' => '10pt'));
	$doc->addParagraph('BANCO: '.$facilitador['banco'], array('font-size' => '10pt'));
	$doc->addParagraph('TIPO DE CUENTA: '.$facilitador['tipo_cuenta'], array('font-size' => '10pt'));
	$doc->addParagraph('CUENTA No: '.$facilitador['numero_cuenta'], array('font-size' => '10pt'));
	$doc->addParagraph('Titular de la Cuenta: '.$facilitador['nombre_completo'], array('font-size' => '10pt'));
	$doc->addParagraph('C.C. del Titular de la cuenta (Si es distinto al Facilitador): ', array('font-size' => '10pt'));
	$doc->addParagraph('Ciudad de la cuenta: __________', array('font-size' => '10pt'));
	
	$doc->addParagraph('');
	
	$doc->startTable(NULL, 'tableWithoutGrid');
	$header = array('SOPORTE DE COSTOS Y DEDUCCIONES');
	$aligns = array('center');
	$valigns = array('middle');
	$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'bold', 'font-size' => '10pt'));
	$doc->endTable();

	$doc->addParagraph('');
	$doc->startTable(array('width'=>'20'), 'tableWithoutGrid');
	$header = array('A&ntilde;o', 'Mes', 'D&iacute;a');
	$aligns = array('center', 'center', 'center');
	$valigns = array('middle', 'middle', 'middle');
	$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'bold', 'font-size' => '10pt'));
	$col = array();
	$col[] = '____';$col[] = '____';$col[] = '____';
	$doc->addTableRow($col, NULL, NULL, array('font-size' => '10pt'));
	$doc->endTable();	

	$doc->addParagraph('');
	$doc->addParagraph('Corporaci&oacute;n Infancia y Desarrollo', array('font-size' => '10pt', 'font-weight' => 'bold'));
	$doc->addParagraph('NIT. 830.082.544-7', array('font-size' => '10pt'));
	$doc->addParagraph('Cra. 22 No 143-11 Tel. 5202213 - 5202215', array('font-size' => '10pt'));
	$doc->addParagraph($nombre_contrato, array('font-size' => '8pt'));
	$doc->addParagraph('"Implementaci&oacute;n del Modelo Educativo A CRECER"', array('font-size' => '8pt'));

	$doc->addParagraph('');
	$doc->addParagraph('DEBE A',array('text-align'=>'center','font-weight' => 'bold'));

	$doc->addParagraph('');
	$doc->startTable(NULL, 'tableWithoutGrid');
	$header = array('Raz&oacute;n Social / Nombre Completo Facilitador/a');
	$aligns = array('center');
	$valigns = array('middle');
	$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'bold', 'font-size' => '10pt'));
	$col = array();
	$col[] = "<br/>".$facilitador['nombre_completo'];
	$doc->addTableRow($col, NULL, NULL, array('font-size' => '9pt', 'align'=>'center'));
	$doc->endTable();

	$doc->startTable(NULL, 'tableWithoutGrid');
	$col = array();
	$col[] = "<br/>NIT/RUT: ".$facilitador['documento'];
	$col[] = "<br/>Tel&eacute;fono: ".$facilitador['telefono'];
	$doc->addTableRow($col, NULL, NULL, array('font-size' => '10pt'));
	$col = array();
	$col[] = "<br/>Direcci&oacute;n: ".$facilitador['direccion'];
	$col[] = "<br/>Ciudad: ".$info_grupo['municipio'];
	$doc->addTableRow($col, NULL, NULL, array('font-size' => '10pt'));
	$doc->endTable();

	$doc->addParagraph('');
	$doc->startTable(NULL, 'tableWithoutGrid');
	$header = array('Descripci&oacute;n exacta del bien o servicio');
	$aligns = array('center');
	$valigns = array('middle');
	$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'bold', 'font-size' => '10pt'));
	$col = array();
	$descripcion = "<br/>Por concepto de servicios prestados como facilitador/a proyecto 'Implementaci&oacute;n del Modelo A CRECER' ";
	$descripcion = $descripcion."que se lleva a cabo en el municipio de ".$info_grupo['municipio']." en cumplimiento del ".$nombre_contrato."<br/>";
	$col[] = $descripcion;
	$doc->addTableRow($col, NULL, NULL, array('font-size' => '9pt', 'align'=>'center'));
	$doc->endTable();

	$doc->addParagraph('');
	$doc->addParagraph('');
	$doc->startTable(array('border'=>'0'), 'tableWithoutGrid');
	$header = array(' ', 'Base Retenci&oacute;n');
	$aligns = array('center', 'center');
	$valigns = array('middle', 'middle');
	$doc->addTableRow($header, $aligns, $valigns, array('font-weight' => 'bold', 'font-size' => '10pt', 'border'=>'0'));
	$col = array();
	$col[] = "Honorarios";
	$col[] = "$ 725.000.oo";
	$doc->addTableRow($col, NULL, NULL, array('font-size' => '9pt', 'align'=>'center', 'border'=>'0'));
	$col = array();
	$col[] = "Retenci&oacute;n";
	$col[] = "$";
	$doc->addTableRow($col, NULL, NULL, array('font-size' => '9pt', 'align'=>'center', 'border'=>'0'));
	$col = array();
	$col[] = "Reteica(9.66/1000)";
	$col[] = "$ ___________";
	$doc->addTableRow($col, NULL, NULL, array('font-size' => '9pt', 'align'=>'center', 'border'=>'0'));	
	$col = array();
	$col[] = "Total a Pagar";
	$col[] = "$ 725.000.oo";
	$doc->addTableRow($col, NULL, NULL, array('font-size' => '9pt', 'align'=>'center', 'border'=>'0'));
	$doc->endTable();
	
	$doc->addParagraph('');
	$doc->addParagraph('');
	$doc->addParagraph('Son: SETECIENTOS VEINTICINCO MIL PESOS M/CTE',array('text-align'=>'justify','font-weight' => 'bold'));

	$doc->addParagraph('');
	$doc->addParagraph('');
	$doc->addParagraph('');
	$doc->addParagraph('_____________________',array('text-align'=>'justify','font-weight' => 'bold'));
	$doc->addParagraph('Firma',array('text-align'=>'justify','font-weight' => 'bold'));
	$doc->addParagraph('C.C.: '.$facilitador['documento'],array('text-align'=>'justify','font-weight' => 'bold'));
	
	$doc->output('Cuenta de Cobro y Soporte de Costos '.$pago.' - '.$facilitador['nombre_completo']);
	
?>